package study.springboot.mybatis.support.pagehelper;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Properties;

@Slf4j
@Configuration
public class PageHelperConfig {

    @Bean("user_pageHelper")
    @ConfigurationProperties(prefix = "mypagehelper.user")
    public Properties userProps() {
        return new Properties();
    }

    @Bean("order_pageHelper")
    @ConfigurationProperties(prefix = "mypagehelper.order")
    public Properties orderProps() {
        Properties prop = new Properties();
        log.info("=========== {}", prop);

        return prop;
    }
}
